home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 1996 #6 / Amiga Plus CD - 1996 - No. 06.iso / pd / netz / dl / dl.h < prev    next >
C/C++ Source or Header  |  1992-09-02  |  2KB  |  89 lines

  1. /* Copyright (C) 1995, 1996 Zlatko Calusic <maverick@fly.cc.fer.hr>
  2. This file is part of DownLoad, FTP Client
  3.  
  4. The DownLoad is free software; you can redistribute it and/or modify it
  5. under the terms of the GNU General Public License as published by the Free
  6. Software Foundation.
  7.  
  8. The DownLoad is distributed in the hope that it will be useful, but WITHOUT
  9. ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  10. FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
  11. more details.
  12.  
  13. You should have received a copy of the GNU General Public License along with
  14. the DownLoad source; see the file COPYING.  If not, write to the Free
  15. Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
  16.  
  17. #include <stdio.h>
  18. #include <stdlib.h>
  19. #include <unistd.h>
  20. #include <fcntl.h>
  21. #include <errno.h>
  22. #include <signal.h>
  23. #include <netdb.h>
  24. #ifdef AMIGA
  25. #include <dos.h>
  26. #else
  27. #include <sys/uio.h>
  28. #endif
  29. #include <sys/stat.h>
  30. #include <sys/time.h>
  31. #include <sys/types.h>
  32. #include <sys/socket.h>
  33. #include <netinet/in.h>
  34. #include <arpa/inet.h>
  35.  
  36. #if defined(ultrix)
  37. #  include <strings.h>
  38. #else
  39. #  include <string.h>
  40. #endif
  41.  
  42. #if defined(linux)
  43. #    include <linux/time.h>
  44. #endif
  45.  
  46. #if defined(_AIX)
  47. #    include <sys/select.h>
  48. #endif
  49.  
  50. #define PROGRAM "DownLoad"
  51. #define VERSION "1.00"
  52. #define AUTHOR "Zlatko Calusic"
  53. #define EMAIL "<maverick@fly.cc.fer.hr>"
  54. #define DATE "13 Feb 1996"
  55.  
  56. #define BUFFER 65536    /* transfer buffer */
  57. #define TMOUT 600        /* timeout while reading socket (in seconds) */
  58. #define MAXRETRY 50        /* max. number of tries */
  59.  
  60. /* Don't change these !!! */
  61.  
  62. #define ERROR 0
  63. #define OK 1
  64.  
  65. extern int errno;
  66.  
  67. /* Function declarations */
  68.  
  69. void fperror(char *);
  70. void fatal(char *);
  71. void initialize(int, char **);
  72. int download(void);
  73.  
  74. int retrieve_file(void);
  75.  
  76. int get_response(void);
  77. int ftprequest(char *format, char *arg);
  78. int establish_connection(void);
  79. int get_port(void);
  80. int accept_data(void);
  81. int get_list(void);
  82. void timer_on(int);
  83.  
  84. char *rate(int, int);
  85. int parse(void);
  86. int match(char *, char *, int);
  87.  
  88. int getlocalhost(void);
  89.